<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<div id="container">
			<div class="content">
				<input type="button" value="点击抛出错误11" onclick="btnClick()" />
				<input type="button" value="点击抛出promise错误" onclick="btnPromiseClick()" />
				<input type="button" value="点击抛出promise错误" onclick="btnPromiseClick()" />
			</div>
		</div>
	</body>
	
</html>
	<script>
		

		//         if (module.hot) {
		// 	module.hot.accept()
		// }
		function btnClick() {
			window.someVariable.error = 'someVariable'
		}
		function btnPromiseClick() {
			new Promise(function (resolve, reject) {
				console.log(someVar.some)
			})
		}
		console.log('11')
		window.onerror = function (msg, url, line, col, error) {
			console.log('捕获到异常：', {
				msg,
				url,
				line,
				col,
				error
			})
		}
		console.log('22')
	</script>
	<!-- <script src="error.js"></script> -->
</html>
